<?php

include_once('../../php/postgre.php');
$idk = $_GET['idk'];
if (is_numeric($idk)) {  
	$ind= get_data("Select * from spm_indikator where id_indikator = '$idk'");
    $rw = get_data("SELECT COUNT(*) as cnt from spm_kegiatan where id_indikator = '$idk'");
	$kdpel = $pel['id_pelayanan'];
	$kdind = $ind['kode_indikator'];
    $vlue = $rw['cnt'] + 1;
    $kodekeg = ($vlue <= 9) ? "0" . $vlue : $vlue;
    $kd = $kdind . "." . $kodekeg;
    echo $kd;
}
?>